package com.company.behavioral.memento_pattern.caretaker;

import com.company.behavioral.memento_pattern.memento.ChessmanMemento;

import java.util.ArrayList;

/**
 * @ClassName MementoCaretaker
 * @Author tiezheng.han
 * @Date 2020/9/4 18:09
 **/
public class MementoCaretakers {
    private ArrayList<ChessmanMemento> mementoList = new ArrayList<>();

    public ChessmanMemento getMemento(int i) {
        return mementoList.get(i);
    }

    public void setMemento(ChessmanMemento memento) {
        mementoList.add(memento);
    }
}
